<include file="System:leftmenu" />
<div class="content-right fl">
 
    <h1 class="content-right-title">模板消息设置</h1>
    
	
		<div class="mgl120">
            <a id="sethangye" class="btn btn-primary j-add">设置行业</a>
        </div>
     
		<div class="mgl120">
			<a id="addtmpl" class="btn btn-primary j-add">添加模板消息</a>
		</div>


</div>
<script>

$('#sethangye').on('click',function(){
	layer.load();//正在加载
	$.get('/admin/system/settmpl?set=1',function(data){
		layer.closeAll('loading');//关闭正在加载
        if(data.ret == 0){
            // 成功
            var messagetype = 1;
        }else{
            // 失败
            var messagetype = 2;
        }
        layer.msg(data.msg, {icon: messagetype});
	})
})


$('#addtmpl').on('click',function(){
	layer.load();//正在加载
    $.get('/admin/system/settmpl?add=1',function(data){
    	layer.closeAll('loading');//关闭正在加载
        if(data.ret == 0){
            // 成功
            var messagetype = 1;
        }else{
            // 失败
            var messagetype = 2;
        }
        layer.msg(data.msg, {icon: messagetype});
    })
})

</script>